var mongoose = require('mongoose');
var config = global.config.mongodb[global.config.env];

mongoose.connect('mongodb://' + config.user + ":" + config.pwd + "@" + config.host + ":" + config.port + "/" + config.database, {
	useMongoClient: true,
});

module.exports = mongoose;